#include<stdio.h>
#include<assert.h>

char *my_strcpy(char *strDst,const char *strSrc)
{
	assert((strSrc!=NULL) && (strDst!=NULL));
	
	char *pstrDst=strDst;
        while((*strDst=*strSrc)!='\0')
	{
		strDst++;
		strSrc++;
	}
	strDst--;
        printf("pstrDst :%s ,address:%p\n",pstrDst,pstrDst);
        printf("pstrDst copy:%s,%s\nstrDst:%s,address:%p\n",pstrDst,pstrDst+2,strDst,strDst);
	return pstrDst;
}

int main(int argc,char* argv[])
{
	char *strSrc = "aspire to inspire"; //my name is jack
	char strDest[20]={'\0'};

	printf("copy src:%s\n",strSrc);
	my_strcpy(strDest,strSrc);
	printf("copy dst:%s ,address:%p\n",strDest,strDest);

	printf("");
	return 0;
}



























